import { useRouterBeforeEach, useRouterAfterEach } from './router.config';
import { createRouter, createWebHistory } from 'vue-router';
import type { RouteRecordRaw } from 'vue-router';
import defaultRoutes from './modules/default.module';
const routes: RouteRecordRaw[] = [...defaultRoutes];
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
});
/**
 * 路由前置守卫
 */
// router.beforeEach(useRouterBeforeEach);
/**
 * 路由后置守卫
 */
router.afterEach(useRouterAfterEach);
export default router;
